Implementing a Language with Flow-Sensitive and Structural Typing on the JVM
نویسندگان
چکیده
Dynamically typed languages are flexible and impose few burdens on the programmer. In contrast, static typing leads to software that is more efficient and has fewer errors. However, static type systems traditionally require every variable to have one type, and that relationships between types (e.g. subclassing) be declared explicitly. The Whiley language aims to hit a sweet spot between dynamic and static typing. This is achieved through structural subtyping and by typing variables in a flow-sensitive fashion. Whiley compiles to the JVM, and this presents a number of challenges. In this paper, we discuss the implementation of Whiley’s type system on the JVM.
منابع مشابه
Case Study: Implementing a Java JIT Compiler in Haskell
We present a JVM prototype implemented in the purely-functional language Haskell. It exploits several features of the language, such as strong static typing to implement an intermediate representation, and abstraction mechanism to express machine code generation in the manner of a domain specific language. The compiler consists of (i) a pass to transform Java bytecode to a register-based interm...
متن کاملA Formal Speci cation of Java Virtual Machine Instructions for Objects Methods and Subroutines
In this chapter we formally specify a subset of Java Virtual Machine JVM instructions for objects methods and subroutines based on the o cial JVM Speci cation the o cial Java Language Speci cation and Sun s JDK imple mentation of the JVM Our formal speci cation describes the runtime behaviors of the instructions in relevant memory areas as state transitions and most structural and linking const...
متن کاملA Formal Speci cation of JavaTM
In this chapter we formally specify a subset of Java Virtual Machine (JVM) instructions for objects, methods and subroutines based on the oocial JVM Speciication, the oocial Java Language Speciication and Sun's JDK 1.1.4 implementation of the JVM. Our formal speciication describes the runtime behaviors of the instructions in relevant memory areas as state transitions and most structural and lin...
متن کاملStructural and Flow-Sensitive Types for Whiley
Modern statically typed languages require variables to be declared with a single static type, and that subtyping relationships between used-defined types be made explicit. This contrasts with dynamically typed languages, where variables are declared implicitly, can hold values of different types at different points and have no restrictions on flow (leading to ad-hoc and implicit subtyping). We ...
متن کاملEfficient Translation of Haskell to Java Master’s Thesis Proposal
The Java Virtual Machine [LY99] is an abstract machine designed to support object oriented languages. The strong security guarantees enforced by the JVM and it‘s portability make it a desirable target for distributing mobile code. Haskell [JHA99] is non-strict, higherorder functional language. Mapping non-strict higher order languages to any stock machine poses many unique challenges [Jon92]. M...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 279 شماره
صفحات -
تاریخ انتشار 2011